{extend name="admin/public/base"/}
{block name="body"}
<div class="box box-primary">
	<div class="box-header with-border">
		<h3 class="box-title">{$meta_title}</h3>
		<div class="box-tools pull-right">
		</div>
	</div>
	<div class="box-body">
		<form method="post" class="form form-horizontal" action="edit">
			<div class="nav-tabs-custom">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#pc" data-toggle="tab">PC端模板</a></li>
					<li><a href="#mobile" data-toggle="tab">移动端模板</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane fade in active" id="pc">
						<div class="row">
							{volist name="list['pc']" id="item"}
							<div class="col-sm-4 col-md-3">
								<div class="thumbnail">
									<img src="{$item['preview']}" alt="{$item['name']}" class="img-rounded">
									<div class="caption">
										<h4>{$item['name']}</h4>
										<p class="text-right">
											{if $pc == $item['id']}
											<button class="btn btn-danger btn-block" disabled>已启用</button>
											{else/}
											<a href="{:url('/admin/config/setthemes', ['name'=>'pc', 'id'=> $item['id']])}" class="btn btn-primary btn-block ajax-get">启用</a>
											{/if}
										</p>
									</div>
								</div>
							</div>
							{/volist}
						</div>
					</div>
					<div class="tab-pane fade" id="mobile">
						<div class="row">
							{volist name="list['mobile']" id="item"}
							<div class="col-sm-4 col-md-3">
								<div class="thumbnail">
									<img src="{$item['preview']}" alt="{$item['name']}" class="img-rounded">
									<div class="caption">
										<h4>{$item['name']}</h4>
										<p class="text-right">
											{if $mobile == $item['id']}
											<button class="btn btn-danger btn-block" disabled>已启用</button>
											{else/}
											<a href="{:url('/admin/config/setthemes', ['name'=>'mobile', 'id'=> $item['id']])}" class="btn btn-primary btn-block ajax-get">启用</a>
											{/if}
										</p>
									</div>
								</div>
							</div>
							{/volist}
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>

{/block}